package photobox.photo
/**
 * 分类对象
 */
class Category {
    String  name
    String  remark

    Date  dateCreated
    Date  lastUpdated
    Integer categoryType

    static final int CATEGORY_TYPE_THEME = 1//1主题，2风格
    static final int CATEGORY_TYPE_STYLE = 2

    static mapping = {
        table 'pht_category'
    }

    static constraints = {
        name  blank: false, size: 2..20, unique: true
        remark  nullable: true, blank: true, maxSize: 500
        categoryType inList: [CATEGORY_TYPE_THEME,CATEGORY_TYPE_STYLE]
    }
}
